<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/1/5
 * Time: 14:48
 */

namespace App\Http\Controllers\MiniProgram;


use App\Http\Logics\MiniProgram\EntryMenuLogic;
use App\Http\Traits\EntryMenuTrait;
use App\Http\Controllers\BaseController;
class EntryMenuController extends BaseController
{
    use EntryMenuTrait;

    /**
     * @SWG\Post(
     *     path="/entryMenu/list",
     *     tags={"EntryMenu"},
     *     description="获取合作者小程序首页入口列表",
     *     operationId="getEntryMenuList",
     *     produces={"application/json", "application/xml", "text/xml", "text/html"},
     *     @SWG\Parameter(
     *         name="loginSession",
     *         in="query",
     *         description="验证秘钥",
     *         required=true,
     *         type="string"
     *     ),
     *     @SWG\Response(
     *         response=200,
     *         description="pet response"
     *     )
     * )
     */
    public function getEntryMenuList()
    {
        $partner_id = $this->partner_id;
        $data = [
            'partner_id' => $partner_id
        ];
        $response = EntryMenuLogic::getEntryMenuList($data);
        if ($response->code){
            return $this->response($response->code, $response->message);
        }
        return $this->response($response->code, $response->message, $response->data);
    }
}